home *** CD-ROM | disk | FTP | other *** search
- Path: engnews2.Eng.Sun.COM!positive!linden
- From: linden@positive.eng.sun.com (Peter van der Linden)
- Newsgroups: comp.lang.c
- Subject: Re: malloc() problem
- Date: 28 Feb 1996 21:27:09 GMT
- Organization: Sun Microsystems Computer Corporation
- Message-ID: <4h2hbd$9ra@engnews2.Eng.Sun.COM>
- References: <31332992.41C6@mashie.ece.jhu.edu>
- NNTP-Posting-Host: positive.eng.sun.com
- Cc:
-
- > Recently I have been haunted by the core dump inside malloc() on SGI
- >Indigo2 IRIX5.2, I know the problem is caused by my program not the
- >malloc(). But I couldn't find the bug? Does any C expert has identified
- >the common reasons for malloc to core dump? Your help will probably help
-
- Your code probably stomped on the malloc structures at some earlier point,
- it could be unrelated to what it is doing at the time it coredumps.
- This could be as simple as
-
- a[-1] = ....
-
- Check all the dynamic memory you allocate. Make sure you never write
- off the end of what you allocated.
-
- --
- Peter van der Linden linden@eng.sun.com
- "Dereference misaligned, then cuss. Cause an error on the bus"
- No, I'm afraid that I'm unable to say that I disapprove of
- your idea not being cancelled,
-